home *** CD-ROM | disk | FTP | other *** search
- Path: airdmhor.gen.nz!not-for-mail
- From: gumboot@airdmhor.gen.nz (Simon Hosie)
- Newsgroups: comp.lang.c
- Subject: Re: string compressor
- Date: 5 Apr 1996 05:29:33 +1200
- Organization: Airdmhor : a couple of BBS's, a bunch of people, and a cat.
- Distribution: world
- Message-ID: <4k10tt$van@airdmhor.gen.nz>
- References: <4jpve8$12i@news.cic.net> <Pine.A32.3.91.960401194646.83526C-100000@red.weeg.uiowa.edu>
- NNTP-Posting-Host: airdmhor.gen.nz
- X-Newsreader: TIN [version 1.2 PL2]
-
- On 2 Apr 1996, Bob Dole wrote:
- > If someone would please write me a good string compressor, and let me have
- > the routines as well <yes, a lot to ask> I would be very appreciated. I
- > also need a decompressor for it, as well.
-
- The Amorphous Mass:
- > char *compress(char *str)
- > {
- > if (str) *str = 0;
- > return str;
- > }
- > 100% compression every time. :-)
-
-
- char *decompress(char *str)
- {
- if (str) *str = rand() % CHAR_MAX + 1;
- return str;
- }
-
-
- It's a bit lossy, don't you think?
-